package com.tjtt.tdm.system.dao;
import java.util.List;
import java.util.Map;

import com.tjtt.tdm.base.EntityDAO;
import com.tjtt.tdm.base.PageResult;
import com.tjtt.tdm.exception.DaoException;
import com.tjtt.tdm.exception.ServiceException;
import com.tjtt.tdm.system.bean.Organization;

public interface OrganizationDao extends EntityDAO<Organization> {
	/**
	 * 查询所有的分类节点
	 * @return List<Organization>
	 * @author 张海娜
	 * @date 2012-9-24 上午10:08:29
	 */
	public List<Organization> getAllTypes() throws DaoException;
	
	/**
	 * 查询房屋管理所有的分类节点
	 * @return List<Organization>
	 * @author 张海娜 quoted by zf
	 * @date 2012-9-24 上午10:08:29
	 */
	public List getAllTypesBFR() throws DaoException;
	public List getAllTypesB() throws DaoException;
	public List getAllTypesF() throws DaoException;
	public List getAllTypesR() throws DaoException;
	
	/**
	 * 
	 * @param parentId
	 * @param filterMap
	 * @return PageResult
	 * @author 张海娜
	 * @date 2012-9-24 下午02:00:30
	 */
	public PageResult findOrganizationByParentId(int orgParentId,
			Map<String, String> filterMap);
	/**
	 * 
	 * @param filterMap
	 * @return PageResult
	 * @author 张海娜
	 * @date 2012-9-24 下午02:00:33
	 */
	public PageResult queryOrganizationList(Map<String, String> filterMap);
	/**
	 *功能描述：组织机构类别列表删除功能 
	 * @param organization void
	 * @author 张海娜
	 * @date 2012-9-24 下午04:47:30
	 */
	public void delete(Organization organization);
	/**
	 * 查看
	 * @param id
	 * @return Organization
	 * @author 张海娜
	 * @date 2012-9-24 下午05:35:35
	 */
	public Organization getOrganizationById(Long id);
	/**
	 * 查找用户表里的组织id
	 * @return
	 * @throws ServiceException String
	 * @author 张海娜
	 * @date 2012-10-22 下午03:11:40
	 */
	public PageResult findUserByOrgId(String ids,Map<String, String> filterMap) throws ServiceException ;
	/**
	 * 根据删除标记delflag为1，查询机构名称是否存在
	 * @param orgName
	 * @return PageResult
	 * @author 张海娜
	 * @date 2012-11-13 下午05:33:47
	 */
	public PageResult findOrganizationByDelflag(String orgName,Map<String, String> filterMap,Long orgParentId);
	
	public PageResult findOrgByDelflag(Long orgId,String orgName,Map<String, String> filterMap);
	public PageResult findUserById(int id,Map<String, String> filterMap);
	public PageResult queryUserList(Map<String, String> filterMap);
	/**
	 * 查询名称是否存在
	 * @throws Exception void
	 * @author 张海娜
	 * @date 2013-2-21 下午02:06:18
	 */
	public Organization findOrganizationName(String orgName);
	/**
	 * 查询编号是否存在
	 * @throws Exception void
	 * @author 张海娜
	 * @date 2013-2-21 下午02:06:16
	 */
	public Organization findOrganizationByorgNo(String orgNo);

	public PageResult findOrganizationorgNoByDelflag(String orgNo, Map filterMap,Long pId);

	public PageResult queryuserByOrganationid(String userByOrganationid,
			Map<String, String> filterMap);

	public boolean isUsingItem(String ids, String[] tables, String[] fieldNames);

	public List<Organization> getAllTypes4() throws DaoException ;


	public List<Organization> getAllTypesBuFen() throws DaoException;
}
